/**
 * <p>Copyright (c) 2016 深圳市鹏途交通科技有限公司</p>
 * <p>					All right reserved. 		 </p>
 * <p>项目名称 ： 	深圳公路信息资源整合及国省检日常化监管管理项目        </p>
 * <p>创建者   :	wy
 * <p>描   述  :  A7-01-县乡公路建设 </p>
 * <p>最后修改 :  $: 2017-5-19-上午10:16:11	wy   $     </p>
 * 
 */

package com.pengtu.gsj.entity.gcjs;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.pengtu.gsj.entity.app.Attachment;
import com.pengtu.gsj.entity.base.IdEntity;

@Entity
@Table(name = "T_PFB_XXROADCONSTRUCTIONA")
public class XXRoadConstructionA extends IdEntity {

	private static final long serialVersionUID = -6429870906188976336L;

	private String units; // 单位

	private String year; // 年度

	private Long itemNum; // 项目总数

	private Double workNum; // 开工比例

	private Double completeNum; // 完工比例
	
	private Double acceptNum; // 验收比例
	
	private String formalitiesWell; // 手续是否完善	
	
	private String remark; //备注

	private Integer bulletinNumber;     //检测文件数
	private List<Attachment> attachments;
	
	public XXRoadConstructionA() {
	}
	
	public XXRoadConstructionA(String year) {
		this.year = year;
	}

	public XXRoadConstructionA(Long itemNum, Double workNum, Double completeNum, Double acceptNum) {
		this.itemNum = itemNum;
		this.workNum = workNum;
		this.completeNum = completeNum;
		this.acceptNum = acceptNum;
	}

	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Column(name = "UNITS")
	public String getUnits() {
		return units;
	}

	public void setUnits(String units) {
		this.units = units;
	}

	@Column(name = "YEAR")
	public String getYear() {
		return year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	@Column(name = "ITEMNUM")
	public Long getItemNum() {
		return itemNum;
	}

	public void setItemNum(Long itemNum) {
		this.itemNum = itemNum;
	}

	@Column(name = "WORKNUM")
	public Double getWorkNum() {
		return workNum;
	}

	public void setWorkNum(Double workNum) {
		this.workNum = workNum;
	}

	@Column(name = "COMPLETENUM")
	public Double getCompleteNum() {
		return completeNum;
	}

	public void setCompleteNum(Double completeNum) {
		this.completeNum = completeNum;
	}

	@Column(name = "ACCEPTNUM")
	public Double getAcceptNum() {
		return acceptNum;
	}

	public void setAcceptNum(Double acceptNum) {
		this.acceptNum = acceptNum;
	}

	@Column(name = "FORMALITIESWELL")
	public String getFormalitiesWell() {
		return formalitiesWell;
	}

	public void setFormalitiesWell(String formalitiesWell) {
		this.formalitiesWell = formalitiesWell;
	}

	@Transient
	public Integer getBulletinNumber() {
		bulletinNumber = attachments.size();
		return bulletinNumber;
	}

	public void setBulletinNumber(Integer bulletinNumber) {
		this.bulletinNumber = bulletinNumber;
	}

	@OneToMany(fetch = FetchType.LAZY)
	@JoinColumn(name = "PARTID")
	public List<Attachment> getAttachments() {
		return attachments;
	}

	public void setAttachments(List<Attachment> attachments) {
		this.attachments = attachments;
	}
}
